{extend name="admin/public:layout" /}
{block name="title"}举报管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> 举报管理</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                <div class="pull-left">
                </div>
                <div class="pull-right">
                </div>
                <div class="clearfix"></div>
            </div>
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th width="50">#</th>
                    <th>举报信息</th>
                    <th>举报人</th>
                    <th>被举报主题</th>
                    <th>被举报人</th>
                    <th width="120">操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.msg}</td>
                    <td>{$vo.member_info.member_name}</td>
                    <td>{$vo.theme_info.theme_name}</td>
                    <td>{$vo.report_member_info.member_name}</td>
                    <td>
                        <a  class="btn btn-primary" onclick="sendReport('{$vo.id}')">回复</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <div class="page-bar">{$list->render()}</div>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script src="/public/plugins/layer/layer.js"></script>
<script>
    function sendReport(id) {
        layer.prompt({title: '请输入处理结果', formType: 2}, function(text, index){
            $.post("{:url('report')}",{id:id,remsg:text},function (res) {
                layer.msg(res.msg);
                if (res.code){
                    window.location.reload();
                }
            });

        });
    }
</script>
{/block}